package com.vincent.kdp.ui.fragment.repository;

import android.util.Log;

import com.loopj.android.http.RequestParams;
import com.vincent.baseapp.util.SPUtil;
import com.vincent.kdp.PostUrl;
import com.vincent.kdp.http.HttpUtil;
import com.vincent.kdp.http.RequestCallBack;
import com.vincent.kdp.ui.bean.response.WorkerLoginOutput;

public class CenterRepository {
    /**
     * 员工登录
     *
     * @param account  员工账号
     * @param callBack 回调方法
     */
    public void login(String account, RequestCallBack callBack) {
        RequestParams params = new RequestParams();
        params.put("phone", account);
        //传推送的ClientID
        params.put("clientid", SPUtil.getString("clientid"));
        HttpUtil.loadData(PostUrl.WORKER_LOGIN, params, WorkerLoginOutput.class, callBack);
        Log.i("TAGD",PostUrl.WORKER_LOGIN);
    }
}
